home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1996 #15
/
Monster Media Number 15 (Monster Media)(July 1996).ISO
/
tbbs
/
flog310.zip
/
IEMSI.H
< prev
next >
Wrap
C/C++ Source or Header
|
1996-04-19
|
2KB
|
68 lines
/*
FastLog/IEMSI Interface code for adding IEMSI support to programs
external to FastLog/IEMSI v2.31.
Written: 28/10/95
Updated: 16/01/96
Released: 16/01/96
Author: Faye Pearson
(C) 1995,1996 Fe-line Software
*/
char IEMSI_HSK[2049]; // Holds the IEMSI Handshake.
typedef struct
{
char *name, // pointer to the Users Name as given in the IEMSI h/shake
*alias,
*location,
*data,
*voice,
*password,
*birthdate,
*crtdef, // pointer to comma delimited info about users Terminal
*protocols, // pointer to comma delimited list of protocols
*capabilities, // pointer to comma delimited list of package capabilities
*requests, // pointer to comma delimited list of user requests
*software, // The software sending the IEMSI Handshake
*xlattabl; // No definition as yet in IEMSI
} IEMSI_PKT;
IEMSI_PKT IEMSI_ICI; // Use this to access the fields in the IEMSI packet
#define IEMSI_NOTINST 0 // FastLog/IEMSI Not Installed
#define IEMSI_NOTUSED 1 // Current User not using IEMSI
#define IEMSI_AVAILABLE 2 // User logged in with IEMSI
int getiemsi()
{
FILE *fp;
char *tok;
if((fp=fopen("IEMSI.HSK","rt"))==NULL)
{
Log(LOG_FRIEND,"IEMSI.HSK not found IEMSI not available");
return IEMSI_NOTINST;
}
fgets(IEMSI_HSK,2049,fp);
fclose(fp);
if(strcmp(chk,"NOIEMSI")==0) return IEMSI_NOTUSED;
tok=strchr(chk,'{')+1; // Separate the IEMSI Fields.
IEMSI_ICI.name=strtok(tok,"}");
IEMSI_ICI.alias=strtok(NULL,"}")+1;
IEMSI_ICI.location=strtok(NULL,"}")+1;
IEMSI_ICI.data=strtok(NULL,"}")+1;
IEMSI_ICI.voice=strtok(NULL,"}")+1;
IEMSI_ICI.password=strtok(NULL,"}")+1;
IEMSI_ICI.birthdate=strtok(NULL,"}")+1;
IEMSI_ICI.crtdef=strtok(NULL,"}")+1;
IEMSI_ICI.protocols=strtok(NULL,"}")+1;
IEMSI_ICI.capabilities=strtok(NULL,"}")+1;
IEMSI_ICI.requests=strtok(NULL,"}")+1;
IEMSI_ICI.software=strtok(NULL,"}")+1;
IEMSI_ICI.xlattabl=strtok(NULL,"}")+1;
return IEMSI_AVAILABLE;
}